{php include pubTemplate("header")}

<div class="container">


    <nav aria-label="breadcrumb">
        <ol class="breadcrumb">
            <li class="breadcrumb-item"><a href="{SITE_URL}">首页</a></li>
            <li class="breadcrumb-item"><a href="{tsUrl('group')}">{$TS_APP['appname']}</a></li>
            <li class="breadcrumb-item"><a href="{tsUrl('group','show',array('id'=>$strGroup['groupid']))}">{$strGroup[groupname]}</a></li>
            <li class="breadcrumb-item active" aria-current="page">小组设置</li>
        </ol>
    </nav>


    <div class="card">
        <div class="card-body">


            {template edit_xbar}


            <div class="row">
                <div class="col-md-3"></div>
                <div class="col-md-6">


                    <form class="form-inline" role="form" method="get" action="{SITE_URL}index.php">

                        <input type="hidden" name="app" value="group" />
                        <input type="hidden" name="ac" value="edit" />
                        <input type="hidden" name="ts" value="user" />
                        <input type="hidden" name="groupid" value="{$groupid}" />

                        <div class="form-group">
                            <input type="text" name="guserid" class="form-control form-control-sm" placeholder="输入用户ID">
                        </div>

                        <button type="submit" class="btn btn-sm btn-info ml-1">搜索</button>

                    </form>


                    <div class="alert alert-info mt-3">
                        * 有效期等于0000-00-00 或者 1970-01-01 即为永久
                    </div>


                    <table class="table table-bordered mt-3">
                        <thead class="thead-light">
                        <tr><th>用户ID</th><th>用户名</th><th>有效期</th><th class="tar">操作</th></tr>
                        </thead>

                        <tbody>
                        {loop $arrGroupUser $key $item}
                        <tr><td>{$item['userid']}</td><td>{$item['username']}</td><td>{$item['endtime']}</td><td class="tar">

                            {if $TS_APP['ispayjoin']==1 && $strGroup['joinway']==3}<a href="javascript:void('0');" onclick="openXuqi('{$item[userid]}')">续期</a> | {/if}
                            <a href="javascript:void('0');" onclick="kickedGroup('{$strGroup['groupid']}','{$item['userid']}')">清退</a>

                        </td></tr>
                        {/loop}
                        </tbody>

                    </table>


                    <div class="page">{$pageUrl}</div>


                </div>
                <div class="col-md-3"></div>
            </div>


        </div>
    </div>

</div>

<div id="xuqi_html" style="display: none;">
    <form id="comm-form" class="form-inline" role="form" method="post" action="{SITE_URL}index.php?app=group&ac=edit&ts=xuqi&groupid={$strGroup['groupid']}">
        <div class="form-group">
            <input type="text" name="endtime" class="form-control br0" placeholder="输入日期如：{php echo date('Y-12-31')}">
        </div>
        <input id="xuqi_userid" type="hidden" name="userid" value="0" />
        <button type="submit" class="btn btn-success br0">点击续期</button>
    </form>
</div>

{php include pubTemplate("footer")}